package test2.quartz;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.quartz.utils.ConnectionProvider;

public class MyConnectionProvider implements ConnectionProvider {
	
	static String url = "jdbc:mysql://192.168.5.34/activemq1?characterEncoding=UTF-8";
	static String user = "root";
	static String password = "123456";

	@Override
	public Connection getConnection() throws SQLException {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		Connection conn = DriverManager.getConnection(url, user, password);
		return conn;
	}

	@Override
	public void shutdown() throws SQLException {

	}

	@Override
	public void initialize() throws SQLException {

	}

}
